<template>
	<view class="content">
		<view class="content_img">
			<tm-images :previmage="false" :src="url"></tm-images>
		</view>
		<view class="content_place">
			<ChonsePlace :address="address" :sdate="sdate" :edate="edate" :sweek="sweek" :eweek="eweek" :stime="stime" :etime="etime" :starttime="starttime" :endtime="endtime" :place="place" :place2="place2" :days="days"></ChonsePlace>
		</view>
		<view class="content_bgimg">
			<tm-images :previmage="false" :src="bgimg" :round="4"></tm-images>
		</view>
		<view class="content_item">
			<GuideContent title="新手指引" content="三步租车不用愁"></GuideContent>
			<GuideContent title="全民砍价" content="千万补贴放肆砍"></GuideContent>
		</view>
		<view class="content_notci">
			<tm-alerts  label="出行指南! 热门 不限区域,任意取还,0元!"  color='orange'></tm-alerts>
		</view>
		<view class="content_bottom">
			<view class="bottom_text" @click="dotest">
				<view class="text_right">
					全国直营，安心出行
				</view>
				<view class="text_left">
					查看详情>
				</view>
			</view>
			<tm-grid @click-dot="iconClick"  @change="change"  :list="list" :grid='3' :icon-size='60' :height='160'></tm-grid>
		</view>
	</view>
</template>

<script>
	import ChonsePlace from "../../compoments/ChonsePlace.vue"
	import GuideContent from "../../compoments/GuideContent.vue"
export default {
	components:{
		ChonsePlace,GuideContent
	},
	data() {
		
		return {
			title: 'Hello',
			locationForm: {},
			on:true,
			url:require('@/static/images/bg.jpg'),
			bgimg:require('@/static/images/gg.png'),
			list:[
				{icon:'/static/index/01.png',text:'全国直营覆盖城市'},
				{icon:'/static/index/02.png',text:'百城干店服务网点'},
				{icon:'/static/index/03.png',text:'7*24小时客服服务'},
				{icon:'/static/index/04.png',text:'万辆新车车型选择'},
				{icon:'/static/index/05.png',text:'微信支付免押面租车'},
				{icon:'/static/index/06.png',text:'全国多省免异地还车'}
			],
			stime:'10:00',
			etime:'10:00',
			sdate:'12月1日',
			edate:'12月2日',
			syear:'2022',
			eyear:'2022',
			sweek:'周五',
			eweek:'周六',
			starttime:'',
			endtime:'',
			place:'临安',
			place2:'肇庆',
			days:'2',
			address:'人民广场'
		};
	},
	onShow() {
		uni.$on('getplace',(place)=>{
			this.place = place
		})
		uni.$on('sendplace',(place2)=>{
			this.place2 = place2
		})
		uni.$on('gettime',(stime,etime,sdate,edate,syear,eyear,sweek,eweek,starttime,endtime,days)=>{
			this.stime=stime
			this.etime=etime
			this.sdate=sdate
			this.edate=edate
			this.syear=syear
			this.eyear=eyear
			this.sweek=sweek
			this.eweek=eweek
			this.starttime=starttime
			this.days =days
			this.endtime =endtime
			console.log('2',this.starttime,this.endtime);
		});
		uni.$on('getaddress',(address)=>{
			this.address=address
		})
	
	},

	onLoad() {

	},
	methods: {
		async getdata() {
			const Rres = await this.$wxRequest({
				url: '/al/test',
				method: 'GET',
				data: { id: 111 }
			});
			console.log('返回数据', Rres);
		},
		// 点击轮播图跳转登录
		doa() {

		},
		// 选择上车的地点
		selectCar() {
		
		
		},
		dotest(){
			uni.navigateTo({
				url:'/pages/rentalpeople/rentalpeople'
			})
		}
	}
};
</script>

<style lang="scss" scoped>
.content{
	width: 100%;
	.content_img{
		width: 100%;
		
	}
	.content_place{
		position: relative;
		top: -30rpx;
	}
	.content_bgimg{
		width: 85%;
		margin: auto;
		border-radius: 30rpx;
	}
	.content_item{
		width: 85%;
		margin: auto;
		display: flex;
		justify-content: space-evenly;
	}
	.content_notci{

	}
	.content_bottom{
		background-color: #ffffff;
		border-radius: 20rpx;
		width: 90%;
		margin: auto;
		margin-bottom: 30rpx;
		.bottom_text{
			display: flex;
		    justify-content: space-between;
			padding: 20rpx;
			
			.text_right{
				font-weight: 600;
				font-size: 28rpx;
			}
			.text_left{

				font-size: 24rpx;
				color: #cccccc;
				
			}
		}
	} 
}
</style>
